body{
    padding-top: 70px;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
}

.top{
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.top img{
    height: 50px;
    margin-right: 20px;
}

.Topnavbar{
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.Topnavbar li{
    margin: 0 20px;
}

.Topnavbar a{
    font-size: 20px;
    text-decoration: none;
    color: #333;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.5s ease;

}

.Topnavbar a:hover{
    background-color: #e0e0e0;
}

.main{
    margin-top: 170px;
    padding: 0;
    height: 100%;
    display: flex;
    justify-content: center;            
    align-items: center;               
}

.title{
    position: absolute;
    top: 20px;
    right: 160px;
    font-size: 48px;
    font-weight: bold;
    font-family: 黑体;
    color: #333;
    margin-top: 80px;
}

.container {
    width: 80%; 
    max-width: 1200px;                  
}

.container_1, .container_2 {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.left, .right {
    flex: 1;                           
    box-sizing: border-box;
    padding: 40px;
    height: 300px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    display: flex;
    align-items: flex-start;            
    justify-content: flex-start;        
    background-size: cover;            
    background-position: center;        
    position: relative;                 /*设置相对定位*/
    overflow: hidden;                   /*避免设置的蒙版溢出*/

}

/* 为每个图片设置一个蒙版 */
.left::after, .right::after {
    content: '';                        /*伪元素,可以在元素前后插入内容，在这里用于实现蒙版的布局*/
    position: absolute;                 
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);   /* 黑色蒙版，透明度为0.5 */
    z-index: 1;                         /* 确保蒙版在文本之下 */
}


@keyframes zoomAndShadow {
    0% {
        opacity: 0.5;              
        box-shadow: none;         
    }
    100% {
        opacity: 1;
        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5); 
    }
}


.left:hover, .right:hover {
    animation: zoomAndShadow 2s ease forwards;
    transform: translateY(-10px);
    transition: all 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.container_1 .left {
    flex: 3;                        
    background-image: url('../images/fire.jpg'); 
}

.container_1 .right {
    flex: 7; 
    background-image: url('../images/ancientgames.jpg'); 
}

.container_2 .left {
    flex: 7; 
    background-image: url('../images/toys.jpg');
}

.container_2 .right {
    flex: 3; 
    background-image: url('../images/medals.jpg'); 
}

.text {
    font-size: 48px;
    font-weight: lighter;
    color: #ffffff; 
    z-index: 2;  
}

a {
    text-decoration: none;
    color: inherit;  
}

.bottom{
    margin-top: 80px;
    padding: 0 100px;
    height: 100%;
    display: flex;
    justify-content: center;          
    align-items: center; 
}

.title_1{
    position: absolute;
    top: 20px;
    left: 130px;
    font-size: 48px;
    font-weight: bold;
    font-family: 黑体;
    color: #333;
    margin-top: 800px;
}
.container_3 {
    display: flex;
    justify-content: space-between;    
    align-items: stretch;              
    padding: 20px;                  
}

.item {
    flex: 1;                           
    margin: 10px;                      
    background-color: #fff; 
    border:2px solid #999;         
    overflow: hidden;                 
    text-align: left;            
    transition: all 0.5s ease;
}

.item:hover{
    transform: translateY(-10px);
    transition: all 0.5s ease;
}

.item a{
    text-decoration: none;
    color: #333;
}

.item img {
    width: 100%;                        
    height: auto;                       
    display: block;                     
}

.item p {
    padding: 2px 20px;
    margin: 10px;                     
    font-family: 华文黑体;            
}
.S1{
    font-size: 16px;
    font-weight: bold;
}
.S2{
    font-size: 20px;
    font-weight: 500;
}

.under{
    margin: 0;
    background-color: #000;
    color: #fff;
}
.Bottonnavbar {
    display: flex;
    justify-content: center;
    padding: 20px 150px;
    border-bottom: 1px solid #444;
    gap: 20px;
}
.section {
    padding: 0 20px;
    display: flex;
    gap: 10px;
    flex-direction: column;
}
.section a {
    text-decoration: none;
    margin: 0 10px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.section a:hover {
    background-color: #444;
}
.first-row{ 
    font-weight: bold;
    color: #fff;
    font-size: 18px;
}
.rows{
    color: #aaa;
    font-size: 0.9em;
}
.footer {
    display: flex;
    justify-content: center;
    padding: 10px;
    background-color: #111;
    color: #aaa;
    font-size: 0.8em;
}
.footer a {
    color: #aaa;
    text-decoration: none;
    margin: 0 20px;
 }
.logo {
    display: flex;
    align-items: left;
}
.logo img {
    height: 100px;
    margin-right: 10px;
 }
.end{
    display: flex;
    justify-content: center;
    margin-top: 10px;
}
.copyright{
    margin: 0;
    color: #bbb;
    font-size: 0.7em;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

@media screen and  (max-width: 768px) {
    .top{
        padding: 5px;
    }

    .top img{
        height: 40px;
        margin-right: 10px;
    }

    .Topnavbar{
        width: 100%;
    }

    .Topnavbar li{
        margin: 0 5px;
    }

    .Topnavbar a{
        font-size: 10px;
        border-radius: 2px;
        padding: 0 5px;
    }

    .main{
        margin-top: 110px;           
    }

    .title{
        top: 10px;
        right: 50px;
        font-size: 24px;
        margin-top: 50px;
    }

    .container_1, .container_2 {
        margin-bottom: 15px;
    }

    .left, .right {
        padding: 20px;
        height: 120px;
    
    }
    .text {
        font-size: 24px;
    }

    .bottom{
        margin-top: 20px;
        padding: 0 20px;
    }

    .title_1{
        top: 10px;
        left: 45px;
        font-size: 24px;
        margin-top: 370px;
    }

    .item {                         
        margin: 5px;                      
    }

    .item:hover{
        transform: translateY(-5px);
    }
    
    
    .item p {
        padding: 0 2px;
        margin: 5px 0;                               
    }
    .S1{
        font-size: 8px;
    }
    .S2{
        font-size: 10px;
    }
    

    .Bottonnavbar {
        padding: 10px;
        justify-content: center;
        gap: 10px;
    }

    .section {
        padding: 5px;
        gap: 5px;
        width: 100%;
    }

    .section a{
        margin: 0;
        padding: 0;
        border-radius: 1px;
    }

    .first-row{
        font-weight: 500;
        font-size: 10px;
    }

    .rows{
        font-size: 8px;
    }

    .footer {
        flex-direction: row;
        font-size: 9px;
    }

    .footer a{
        color: #fff;
        font-weight: 500;
        margin: 0 10px;
    }

    .logo img {
        height: 50px;
    }

    .copyright {
        color: #fff;
        font-size: 8px;
        margin-bottom: 10px;
    }


}

